/**
 * 赛博侦探游戏 - 核心数据类型定义
 */

/**
 * 案件数据结构
 */
export interface CaseData {
  id: string;
  title: string;
  description: string;
  location: string;
  timeOfCrime: string;
  victim: string;
  murderWeapon: string;
  motive: string;
  culpritId: string;
  difficulty: 'easy' | 'normal' | 'hard';
  createdAt: Date;
}

/**
 * 嫌疑人数据结构
 */
export interface SuspectData {
  id: string;
  caseId: string;
  name: string;
  personality: string;
  background: string;
  alibi: string;
  secrets: string[];
  isCulprit: boolean;
  appearance: {
    avatar: string;
    description: string;
  };
  suspicionLevel: number; // 1-10
}

/**
 * 线索数据结构
 */
export interface ClueData {
  id: string;
  caseId: string;
  description: string;
  type: 'physical' | 'testimony' | 'circumstantial' | 'digital';
  importance: number; // 1-5
  isRevealed: boolean;
  revealCondition?: string;
  relatedSuspects: string[];
}

/**
 * 对话数据结构
 */
export interface ConversationData {
  id: string;
  gameSessionId: string;
  suspectId: string;
  question: string;
  response: string;
  timestamp: Date;
  suspicionLevel: number;
  cluesRevealed: string[];
}

/**
 * 游戏会话数据结构
 */
export interface GameSession {
  id: string;
  playerId: string;
  caseId: string;
  timeSpent: number;
  score: number;
  solved: boolean;
  solution: string;
  startTime: Date;
  endTime?: Date;
  conversations: ConversationData[];
  discoveredClues: string[];
}

/**
 * 海报生成数据结构
 */
export interface PosterData {
  caseTitle: string;
  solveTime: string;
  score: number;
  keyClues: string[];
  culprit: string;
  playerName: string;
  difficulty: string;
  shareUrl: string;
}

/**
 * 游戏状态枚举
 */
export type GamePhase = 'menu' | 'case-gen' | 'investigation' | 'reveal';

/**
 * AI Agent响应接口
 */
export interface AgentResponse {
  answer: string;
  newClue?: ClueData;
  emotionalState: 'calm' | 'nervous' | 'defensive' | 'angry' | 'scared';
  suspicionLevel: number;
}

/**
 * 玩家数据结构
 */
export interface PlayerData {
  id: string;
  username: string;
  email?: string;
  totalCasesSolved: number;
  averageTime: number;
  bestScore: number;
  lastPlayed: Date;
}